home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1988 / Oct⁄Nov 88 / TApplication.TrackCursor Bug ? < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.5 KB  |  48 lines  |  [TEXT/GEOL]

  1. Item    5910705                         21-Nov-88        15:21
  2.  
  3. From:   D1974                           NorthWest Rsch Assoc, Dev, D Lucas
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    TApplication.TrackCursor Bug?
  8.  
  9.     In order to force NIL-point dereference problems to the surface, I have
  10. been setting address 0 to an odd value.  The effect has been to expose what
  11. appears to be a MacApp bug.  This bug produces a system Bus Error whenever the
  12. cursor touches the content area of the debug window.  (The bug is manifested
  13. only when debugging is turned on.)  The reason is easy to see.  In
  14. TApplication.TrackCursor we have the following code:
  15.  
  16. ...
  17.    cursorWindow := WMgrToWindow(aWMgrWindow);
  18.    IF (cursorWindow <> gFrontWindow) & (NOT cursorWindow.fDoFirstClick) THEN
  19.    cursorWindow := NIL;
  20.    END
  21.    ELSE
  22.    cursorWindow := NIL;
  23. ...
  24.  
  25. The second line produces the Bus Error whenever cursorWindow = NIL.  In
  26. TApplication.WMgrToWindow we have
  27.  
  28. ...
  29.    IF (aWMgrWindow <> NIL) & (NOT IsDeskAccessory(aWMgrWindow))
  30. {$IFC qDebug}
  31.       & (aWMgrWindow <> gDebugWindowPtr)
  32. {$ENDC}
  33.       THEN
  34.        WMgrToWindow := TWindow(GetWRefCon(aWMgrWindow))
  35.    ELSE
  36.    WMgrToWindow := NIL;
  37. ...
  38.  
  39. which returns NIL whenever the cursor is in the debug window.
  40.  
  41.     Is this it's suppose to work, or is it a bug, or am I doing something
  42. wrong?  Incidently, I am using MacApp 2.0b5.  The error can easily be produced
  43. in any of the MacApp Samples by compiling them with debug and using MacsBug to
  44. set address 0 to a pointer to an odd address.
  45.  
  46.  
  47.  
  48.